
#delimit;
global MY_OUT_PATH  "[path where your master data set is stored]"; 
global MY_FIGURE_PATH "[path where your figures and corresponding data sets are stored]";

clear;
clear matrix;
 
set memory 500m; 
set more off;
set dp comma, permanently;
cap log close;  
use  "${MY_OUT_PATH}wagepercentileratios_p9950.dta", clear;
drop _merge;

merge 1:1 year using "${MY_OUT_PATH}HHearningOECDpercentileratios.dta";
drop _merge;

**************************************************;
** p90/50;
**************************************************;

#delimit;

label var p9050wage "Lohn";
label var p9050HHearningOECD "Haushaltsarbeitseinkommen";
label var p9050wage_incl "Lohn inkl. Arbeitslose";
label var year "Jahr";

drop if year==1983;

graph twoway line p9050wage p9050HHearningOECD p9050wage_incl year ,
xline(1990.5, lcolor(black))
xscale(range(1984 2013))
xlabel(1984(4)2013)
ylabel(1.5(0.5)2.5, format(%4.1f)) 
ytitle("P90/P50-Relation")
lwidth(medthick medthick medthick) lpattern(solid solid dash) lcolor(black gs10 black)
title("P90/P50 L�hne und Haushaltsarbeitseinkommen");
graph save "${MY_FIGURE_PATH}HHearningOECDp9050_incl", replace;
graph export "${MY_FIGURE_PATH}HHearningOECDp9050_incl.ps", replace;
more;


**************************************************;
** p10/50;
**************************************************;

#delimit;

label var p1050wage "Lohn";
label var p1050HHearningOECD "Haushaltsarbeitseinkommen";
label var p1050wage_incl "Lohn inkl. Arbeitslose";

graph twoway line p1050wage p1050HHearningOECD p1050wage_incl  year ,
xline(1990.5, lcolor(black))
xscale(range(1984 2013))
xlabel(1984(4)2013)
ylabel(0.0(0.2)1.0, format(%4.1f)) 
lwidth(medthick medthick medthick medthick) lpattern(solid solid dash dash) lcolor(black gs10 black gs10)
ytitle("P10/P50-Relation")
title("P10/P50 L�hne und Haushaltsarbeitseinkommen");
graph save "${MY_FIGURE_PATH}HHearningOECDp1050_incl", replace;
graph export "${MY_FIGURE_PATH}HHearningOECDp1050_incl.ps", replace;

 
